1. Field of the Invention
This application relates generally to digital image scaling. More specifically, this application relates to a raw domain image scaling system and method that maintains Bayer consistency.
2. Description of Related Art
In a digital image capturing system, it is common that the resolution requirement for still image capture is higher than that of video output. In such a case, a high-resolution camera capable of supporting the resolution requirement of still image capture is often used. When the camera is used in video mode to produce a video output stream, the data is scaled down to suit the resolution of the video output. For example, a particular image sensor with 18 million pixels (megapixels or MP) can give 18 MP still images. For the same image sensor in video mode, a resolution of 1080×1920 pixels, or approximately 2 MP, may suffice to produce 1080p high-definition (HD) video. Therefore, in 1080p video mode, the image data is scaled down 3× both vertically and horizontally to provide the desired output resolution.
In addition to scale changes with the same horizontal and vertical scaling factor, there exist applications where scaling by different scaling factors in the horizontal and vertical directions is required. For example, if an image sensor uses rectangular pixels and there is a need to send out images from the sensor targeted to be displayed on devices with square pixels, then it is necessary to re-sample the image. Such a re-sampling requires scaling the image using different scaling factors in the horizontal and vertical directions. Generally, when the aspect ratio of the image capture device is different from the aspect ratio of the display device, or when the pixel geometry of the image capture device is different form the pixel geometry of the display device, it is necessarily to scale the image in this manner.
This scaling may be performed either in the raw domain or the RGB domain. An advantage of scaling the image data in the raw domain to the desired video resolution is that it reduces the number of pixels that must be processed through the system. As a result, a majority of processing blocks in an image pipeline or post-processing section can be operated at a lower clock rate than the clock rate required to support full-resolution processing. Operating the processing section at a lower clock rate has significant advantages in reducing electromagnetic interference and reducing power consumption of the system. These advantages are especially valuable in such applications as mobile imaging.
However, existing methods of scaling in the raw domain suffer from several disadvantages, including difficulty in maintaining a Bayer output pattern without resorting to increasingly complex, expensive, and resource-intensive logic circuitry. Additionally, such existing scaling methods suffer from inferior image quality when compared to scaling in the RGB domain.
Accordingly, there is a need for raw image scaling with different scaling factors in the horizontal and vertical directions that can efficiently produce output images of high image quality (that is, with good resolution) which are free of the image artifacts produced by existing raw image scaling.